import { Logger } from '@ones-op/node-logger'
import { select } from '@ones-op/node-database'

export async function getData() {
  const result = await select('select content from notice_content where id = 1;')
  return {
    body: {
      content: result.length > 0 ? result[0].content : '',
    },
  }
}

export async function cronTaskAction() {
  const res = await getData()
  Logger.info(res.body.content)
}
